import { createApp } from 'vue'
import './style.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from '@/router'
import store from '@/stores/index'
import { ElMessage } from 'element-plus'
// 导入自定义样式
import '@/styles/theme.css'
// 引入导航守卫js
import '@/utils/permission'
// 暗黑样式
import 'element-plus/theme-chalk/dark/css-vars.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import * as echarts from  'echarts'
//引入vue-echarts组件
import VueECharts from 'vue-echarts'

function bootStrap(){
	const app = createApp(App)
	for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	  app.component(key, component)
	}
	app.use(router)
	app.use(store)
	//在app中引用
	app.use(ElementPlus,{	locale: zhCn,})
	// 注册echarts组件
	app.component('v-chart', VueECharts)
	app.mount('#app')
}
bootStrap()
